<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Button test</title>
<link rel="stylesheet" type="text/css" href="../button/button.css" />
<link rel="stylesheet" type="text/css" href="../popbox/popbox.css" />
<link rel="stylesheet" type="text/css" href="../toolbar/toolbar.css" />
<link rel="stylesheet" type="text/css" href="../popmenu/popmenu.css" />
<link rel="stylesheet" type="text/css" href="menu.css" />
<link rel="stylesheet" type="text/css" href="test.css" />

<script type="text/javascript" src="../../os3jslib/liwe.js"></script>
<script type="text/javascript" src="../../os3jslib/utils.js"></script>
<script type="text/javascript" src="../../os3jslib/dom.js"></script>
<script type="text/javascript" src="../../os3jslib/string_enh.js"></script>
<script type="text/javascript" src="../../os3jslib/object_enh.js"></script>
<script type="text/javascript" src="../../os3jslib/event.js"></script>
<script type="text/javascript" src="../wwl.js"></script>

<script type="text/javascript" src="../button/button.js"></script>
<script type="text/javascript" src="../popbox/popbox.js"></script>
<script type="text/javascript" src="../toolbar/toolbar.js"></script>
<script type="text/javascript" src="../popmenu/popmenu.js"></script>
<script type="text/javascript" src="menu.js"></script>

<script type="text/javascript">
function init ()
{
	var m = new WWL.menu ( 'prova' );

	m.create (
		[
			{ 
				txt: "File", menu: 	[
								{ txt: "Open", cback: function () { alert ( "Open" ); } },
								{ txt: "Disable subs", cback: function () { m.tbar.disable_item ( "subs", true ); } }
							]
			},
			{
				txt: "Subs!", ref_name: "subs", style: "subs", menu: [
							{ txt: "Sub1", menu: 	[
											{ txt: "sub-sub1" },
											{ txt: "sub-sub2" },
											{ txt: "sub-sub2" },
											{ txt: "sub-sub-menu", menu: [
												{ txt: "sub-sub-sub1" },
												{ txt: "sub-sub-sub2" }
															] }
									
			
										]
							},
							{ txt: "Sub2", menu: 	[
											{ txt: "sub-sub1" },
											{ txt: "sub-sub2" },
											{ txt: "sub-sub2" },
											{ txt: "sub-sub-menu", menu: [
												{ txt: "sub-sub-sub1" },
												{ txt: "sub-sub-sub2" }
															] }
									
			
										]
							}
						     ]
			}
		]
	);

	m.render ( 'p1' );
}

</script>
</head>
<body onload="init()">
<div id="p1"></div>

</body>
</html>
